package com.gdkj.enums;

import java.util.*;
import java.util.Map;

/**
 * k钻消费类型
 *
 * @author: zw
 * @date: 2022/9/26
 **/
public enum KCoinUseTypeEnums {
    TJKZ("天降银豆", 1),
    NHWCSL("你画我猜胜利", 2),
    LRSSL("狼人杀胜利", 3),
    LRSDIJ("狼人杀完成第一局", 4),
    LRSSS("狼人杀狼人首胜", 5),
    LRSSLS("狼人杀连胜三局", 6),
    WZQSS("五子棋首胜", 7),
    WZQSLS("五子棋连胜三局", 8),
    WZQLSQJ("五子棋连胜七局", 9),
    WZQLWST("五子棋连玩三天", 10),
    TQSS("国际跳棋首胜", 11),
    TQSLS("国际跳棋连胜三局", 12),
    TQLSQJ("国际跳棋连胜七局", 13),
    TQLWST("国际跳棋连玩三天", 14),
    NHWCSB("你画我猜失败", 15),
    NHWCHC("你画我猜换词", 16),
    NHWCTF("你画我猜游戏中退房", 17),
    LRSSB("狼人杀失败", 18),
    LRSTF("狼人杀游戏中退房", 19),
    WZQTF("五子棋游戏中退房", 20),
    TQTF("国际跳棋游戏中退房", 21),
    BUY_SOIL( "星球探索商店买土", 22),
    BUY_KEY("星球探索商店买钥匙", 23),
    BUY_ENERGY( "星球探索商店买钻石", 24),
    INFINITE_BOX_AWARD( "无限宝箱开奖", 25),
    INFINITE_BOX_BALANCE_EXCHANGE( "无限宝箱余额兑换", 26),
    SIGN_AWARD_EXCHANGE( "签到奖励", 27),
    PASS_AWARD_EXCHANGE( "通关奖励", 28),
    SHARE_UNLOCK_PROP_AWARD_EXCHANGE( "分享解锁道具奖励", 29),
    SHARE_PASS_AWARD_EXCHANGE( "分享通关奖励", 30),
    COMPLETE_SINGLE_TASK_AWARD( "完成单个任务奖励", 31),
    COMPLETE_MULTI_TASK_AWARD( "完成多个任务奖励", 32),
    DIGGING_GOODS_EXCHANGE( "活动商店兑换", 33),
    SWEEP_THUNDER_EXIT_ROOM( "扫雷大作战游戏中退房", 34),
    NUMBER_BOMB_EXIT_ROOM( "数字炸弹游戏中退房", 35),
    FIND_FAULT_TOGETHER_EXIT_ROOM( "找茬游戏中退房", 36),
    THROW_DARTS_EXIT_ROOM( "飞镖达人游戏中退房", 37),
    CLEAR_HAPPY_EXIT_ROOM( "消消乐游戏中退房", 38),
    SLOT( "老虎机", 39),
    SLOT_FIRST_PRESENT( "老虎机首次赠送", 40),
    SWEEP_THUNDER_WIN("扫雷大作战胜利",41),
    SWEEP_THUNDER_FAIL("扫雷大作战失败",42),
    NUMBER_BOMB_WIN("数字炸弹胜利",43),
    NUMBER_BOMB_FAIL("数字炸弹失败",44),
    TWO_MAN_GAME_FIRST_PLAY("双人游戏今日游玩",45),
    TWO_MAN_GAME_WIN_THREE("双人游戏三连胜",46),
    TWO_MAN_GAME_WIN_SEVEN("双人游戏七连胜",47),
    TWO_MAN_GAME_PLAY_THREE("双人游戏连玩三天",48),
    TWO_MAN_GAME_FIRST_WIN("双人游戏首胜",49),
    LUDO_TWO_WIN("Ludo二人局胜利",50),
    LUDO_TWO_FAIL("Ludo二人局失败",51),
    LUDO_FOUR_WIN("Ludo四人局胜利",52),
    LUDO_FOUR_FAIL("Ludo四人局失败",53),
    PUSH_COIN_BOX_BALANCE_EXCHANGE("推币机宝箱余额兑换",54);

    private Integer type;

    private String name;

    KCoinUseTypeEnums(String name, Integer type) {
        this.type = type;
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     * 通过code获取中文名
     */
    public static String getDesByCode(int type) {
        for (KCoinUseTypeEnums typeEnum : KCoinUseTypeEnums.values()) {
            if (typeEnum.getType().equals(type)) {
                return typeEnum.getName();
            }
        }
        return "";
    }

    public static List<Map<String,Object>> getAllType() {
        List<Map<String,Object>> result = new ArrayList<>();
        Map<String,Object> map1 = new HashMap<>();
        map1.put("type",0);
        map1.put("name","全部");
        result.add(map1);
        for (KCoinUseTypeEnums typeEnum : KCoinUseTypeEnums.values()) {
            Map<String,Object> map = new HashMap<>();
            map.put("type",typeEnum.getType());
            map.put("name",typeEnum.getName());
            result.add(map);
        }
        return result;
    }
}
